<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class C_page extends CI_Controller {

	function __construct()
	{
        parent::__construct();
        $this->load->model('article');
        $this->load->model('article_category');
		
        $this->title = "urban resort hotel in Siem Reap : Lynnaya Boutique Hotel";
        $this->meta_title = "urban resort hotel in Siem Reap : Lynnaya Boutique Hotel";
        $this->meta_keywords = "urban resort, resort Siem Reap, boutique Hotel Siem Reap";
        $this->meta_description = "A brand new urban resort hotel on the river of Siem Reap. Cambodia's latest boutique hotel.";
		
		$this->load->model('m_impact');
	}

    public function index(){
        $this->load->view('lyn/index');
    }

    public function contactUs(){

        $this->title = "Contact for a resort hotel in Siem Reap : Lynnaya";
        $this->meta_title = "Contact for a resort hotel in Siem Reap : Lynnaya";
        $this->meta_keywords = "access map. Google map for hotel, contact details";
        $this->meta_description = "Contact details and access map for Lynnaya Urban Boutique resort in cambodia";

        $this->load->view('lyn/v_contact');
    }

    public function error404(){

        redirect();
    }

    public function errorMessage(){

        redirect();
    }

    public function articleByCategory($id, $title){

       /* $data = array();
        $data["page_name"] = "articles";
        $data["extra_article_categories"] = $this->article_category->getCategoriesByType(2);
        $data["articles"] = $this->article->getArticlesByCategory($id);

        $getMeta = $this->article_category->getArticleCategoryMetaByID($id);
        $this->meta_keywords = $getMeta->meta_keyword;
        $this->meta_title = $getMeta->meta_title;
        $this->meta_description = $getMeta->meta_description;
        $this->url = $getMeta->url;
        $this->load->view('sejour/article/v_articles', $data);*/
    }

    public function facilities(){

        $this->title = "Siem Reap Hotel & Resort: Our facilities and amenities";
        $this->meta_title = "River Urban Resort in Siem Reap : all amenities in a luxury Boutique Hotel";
        $this->meta_keywords = "urban resort, resort Siem Reap, boutique Hotel Siem Reap";
        $this->meta_description = "Lynnaya Boutique Resort is proud to provide all the luxury amenities and facilities in the heart of Siem Reap.";
		
		$where = array();
		$data['facilities']	=	$this->m_impact->get_by_fields('facility',$where,'id');
        $this->load->view('lyn/page/v_facilities', $data);
    }
	
	public function pool_spa(){
        $this->title = "Urban Resort Facilities: luxury pool and spa in siem reap";
        $this->meta_title = "Urban Resort Facilities: luxury pool and spa in siem reap";
        $this->meta_keywords = "urban resort, resort Siem Reap, boutique Hotel Siem Reap";
        $this->meta_description = "Lynnaya Urban Resort is delighted to provide  luxurious facilities : Nirvana Spa.";
		
        $this->load->view('lyn/v_pool_spa');
    }
	
	public function galleries($id = false){
        $this->title = "Urban Resort Galleries: luxury pool and spa in siem reap";
        $this->meta_title = "Urban Resort Galleries: luxury pool and spa in siem reap";
        $this->meta_keywords = "urban resort, resort Siem Reap, boutique Hotel Siem Reap";
        $this->meta_description = "Lynnaya Urban Resort is delighted to provide  luxurious facilities : Nirvana Spa.";
		
		if($id == false){
			$id = 1;
			$where = array('type_id'=> $id);
		}else
			$where = array('type_id'=> $id);
			
		$data['id'] = $id;
		$data['galleries'] = $galleries =	$this->m_impact->get_by_fields('tbl_gallery',$where,'id','');
		if(sizeof($galleries) > 0 )
			$data['galleries'] = $galleries;
		else{
			$data['galleries'] = $galleries =	$this->m_impact->get_by_fields('tbl_gallery',array('type_id'=> 1),'id','');
		}
		
        $this->load->view('lyn/page/v_galleries', $data);
    }
	
}// end class
